package com.seagox.desk.remote.controller;

import com.seagox.desk.remote.service.IUserService;
import com.seagox.desk.common.ResultData;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;
	
	/**
     * 连接
     */
    @PostMapping("/connect")
    public ResultData connect(String identifyCode, String validateCode) {
        return userService.connect(identifyCode, validateCode);
    }
    
    /**
     * 更新验证码
     */
    @PostMapping("/updateValidateCode")
    public ResultData updateValidateCode(String userId, String validateCode) {
        return userService.updateValidateCode(userId, validateCode);
    }
	
}

